package chalmers.game.subterranean.model.world;

import chalmers.game.subterranean.model.world.squares.Square;
import chalmers.game.subterranean.util.BlockType;
import chalmers.game.subterranean.util.BlockType.Action;
import chalmers.game.subterranean.util.Direction;
import chalmers.game.subterranean.util.Position;
import chalmers.game.subterranean.util.Resource;

public interface IWorld {

  // TODO check parameter constraints on all methods.
  public Resource dig(Direction direction, Position position, double damage);

  public Position nextPosition(Position position, Direction direction);

  public Action performAction(Position position);

  public BlockType getBlockType(Position position);

    public void performUse(Position position);

  public int raiseLadder(Position startPos, int height);

  public boolean addActionBlock(Position position, Square actionBlock);

  /**
   * Try to add a ladder block on position, if the position already contains a ladderblock, it will
   * get stacked ontop of it.
   * 
   * @param position
   * @return true if ladder can be
   */
  public boolean addLadderBlock(Position position);

  public void start();

  public IWorld restart();
}
